import request from '@/utils/request'

// 分页接口
export function dictTypeList(data) {
  return request({
    url: '/system/dict/type/dictTypeList',
    method: 'post',
    data
  })
}

// 获取详情
export function getInfo(id) {
  return request({
    url: '/system/dict/type/' + id,
    method: 'get'
  })
}

// 新增
export function add(data) {
  return request({
    url: '/system/dict/type/add',
    method: 'post',
    data
  })
}

// 修改
export function edit(data) {
  return request({
    url: '/system/dict/type/edit',
    method: 'put',
    data
  })
}

// 删除
export function remove(ids) {
  return request({
    url: '/system/dict/type/' + ids,
    method: 'delete'
  })
}

// 清除缓存
export function clearCache() {
  return request({
    url: '/system/dict/type/clearCache',
    method: 'delete'
  })
}

// 获取字典选择框列表
export function optionSelect() {
  return request({
    url: '/system/dict/type/optionSelect',
    method: 'get'
  })
}
